package com.java.prototype;

//使用ShapeCache类来获取存储在Hashtable中的形状的克隆
public class PrototypePatternDeo {
    public static void main(String[] args) {
        ShapeCache.loadCache();

        Shape conledShape=ShapeCache.getShape("1");
        System.out.println("shape:"+conledShape.getType());

        Shape conledShape2=ShapeCache.getShape("2");
        System.out.println("shape:"+conledShape2.getType());

        Shape conledShape3=ShapeCache.getShape("3");
//        conledShape3.draw();
        System.out.println("shape"+conledShape3.getType());
    }
}
